Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure unique labels in import-dictionaries #1932

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

ymo-sci
Copy link
Contributor

@ymo-sci ymo-sci commented Feb 8, 2024

Description

Sometimes we have enhanced dictionaries where labels with the same name will be added and always an exception due to a doubled alias will be thrown. With this approach we suffix the labels with the name to ensure uniqueness. Example: WEIGHT and NET_WEIGHT both are translated with "Gewicht" and added to the same import-dictionary will result in "Gewicht" and "Gewicht_NET_WEIGHT" now. (see Screenshots)

  • fixes: SE-13234
Bildschirmfoto 2024-02-08 um 11 35 41 Bildschirmfoto 2024-02-08 um 11 35 08

Additional Notes

  • This PR fixes or works on following ticket(s): SIRI-
  • This PR is related to PR:

Checklist

  • Code change has been tested and works locally
  • Code was formatted via IntelliJ and follows SonarLint & best practices
  • Patch Tasks: Is local execution of Patch Tasks necessary? If so, please also mark the PR with the tag.

Sometimes we have enhanced dictionaries where labels with the same name will be added and always an exception due to a doubled alias will be thrown.
With this approach we suffix the labels with the name to ensure uniqueness.
Example: WEIGHT and NET_WEIGHT both are translated with "Gewicht" and added to the same import-dictionary will result in "Gewicht" and "Gewicht_NET_WEIGHT" now.

- fixes: SE-13234
@ymo-sci ymo-sci added the 🧬 Enhancement Contains new features label Feb 8, 2024
Copy link
Contributor

@fhaScireum fhaScireum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the benefit of using the Label/Alias "Gewicht_property_WEIGHT_SUPER" if I could also simply use "WEIGHT_SUPER"? That defeats the purpose of having simple human readable translations that can be used.

@mkeckmkeck
Copy link
Contributor

What is the benefit of using the Label/Alias "Gewicht_property_WEIGHT_SUPER" if I could also simply use "WEIGHT_SUPER"? That defeats the purpose of having simple human readable translations that can be used.

The problem is, that previously "WEIGHT" and "WEIGHT_SUPER" would both have their label "Gewicht" displayed in the job description. But when actually using "Gewicht" in an import, only one of them would have been used.
The proper solution for such problems would be the elimination of duplicates. But if this is not possible, we should at least be consistent with the handling of the labels.

@ymo-sci ymo-sci merged commit 4425ca5 into develop Feb 9, 2024
2 checks passed
@ymo-sci ymo-sci deleted the feature/ymo/SE-13234-double-alias branch February 9, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧬 Enhancement Contains new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants